import javax.swing.JOptionPane;

public class MyOptionPaneHomework {

	public static void main(String[] args) {

		String name = JOptionPane.showInputDialog("Enter your name: "); 
		String surname = JOptionPane.showInputDialog("Enter your surname: "); 
		Integer age = Integer.parseInt(JOptionPane.showInputDialog("Enter your age: "));
		
		String dialog = ". \nYour age is " + age;
		
		if (age < 40) dialog = dialog + "... you are still young!";
		if (age >= 40) dialog = dialog + "... you are getting old.";
		
		JOptionPane.showMessageDialog(null, "Hello " + name + " " + surname + dialog); 	
	}
}